import os
 
a = 0
train_txt = open('train.txt','w')
val_txt = open('val.txt','w')
for i in os.listdir('JPEGImages'):
    if a < 57*0.8: #train
        print('/home/hdkj/darknet/custom_training/JPEGImages/' + i,file=train_txt,flush=True)
    else: #test
        print('/home/hdkj/darknet/custom_training/JPEGImages/' + i,file=val_txt,flush=True)
    a = a + 1

    
    
